package com.Java.train.business.entity;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.math.BigDecimal;
import java.sql.Time;
import java.util.Date;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;
import lombok.experimental.Accessors;

/**
 * <p>
 * 火车车站
 * </p>
 *
 * @author luomoxingchen
 * @since 2024-09-22
 */
@Getter
@Setter
@Accessors(chain = true)
@TableName("train_station")
@ApiModel(value = "TrainStation对象", description = "火车车站")
@ToString
public class TrainStation implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty("id")
    @TableId(value = "id", type = IdType.ASSIGN_ID)
    private Long id;

    @ApiModelProperty("车次编号")
    @TableField("train_code")
    private String trainCode;

    @ApiModelProperty("站序")
    @TableField("idx")
    private Integer idx;

    @ApiModelProperty("站名")
    @TableField("ts_name")
    private String name;

    @ApiModelProperty("站名拼音")
    @TableField("name_pinyin")
    private String namePinyin;

    @ApiModelProperty("进站时间")
    @TableField("in_time")
    private Time inTime;

    @ApiModelProperty("出站时间")
    @TableField("out_time")
    private Time outTime;

    @ApiModelProperty("停站时长")
    @TableField("stop_time")
    private Time stopTime;

    @ApiModelProperty("里程（公里）|从上一站到本站的距离")
    @TableField("km")
    private BigDecimal km;

    @ApiModelProperty("新增时间")
    @TableField(value = "create_time", fill = FieldFill.INSERT)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    private Date createTime;

    @ApiModelProperty("修改时间")
    @TableField(value = "update_time", fill = FieldFill.INSERT_UPDATE)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    private Date updateTime;
}
